import base from '@/api/baseurl';
import request from '@/utils/request'

export function findSystemMessage(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/like',
    method: 'get',
    params: query
  })
}

export function addSystemMessage(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/add',
    method: 'post',
    data
  })
}

export function updateSystemMessage(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/update',
    method: 'post',
    data
  })
}

export function delSystemMessage(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/del',
    method: 'get',
    params: query
  })
}

export function publishSystemMessage(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/publish',
    method: 'post',
    params: query
  })
}

export function noPublishSystemMessage(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/noPublish',
    method: 'post',
    params: query
  })
}

export function findStatusSystemMessage(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/findStatus',
    method: 'get',
    params: query
  })
}

export function delManySystemParam(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/message/delMany',
    method: 'post',
    data
  })
}

/* TODO: 测试登录 */
export function loginqqq(query) { 
  return request({
    baseURL: base.appBaseApi,
    url: '/authority/login',
    method: 'get',
    params: query
  })
}
 